package org.ims.inv.model.project;

import org.ims.inv.model.flow.ModelFlowNode;
import org.ims.inv.model.flow.confer.ModelFlowConfer;

/**
 * 项目流程审批
 * 
 * @author Jeccy.Zhao
 *
 */
public class ModelProjectProcess
extends ModelFlowNode
{

	/**
	 * Serial UID
	 */
	private static final long serialVersionUID = -2774737893886626356L;
	
	/**
	 * 所属项目
	 */
	private ModelProject project;
	
	/**
	 * 依赖审批环节
	 */
	private ModelFlowConfer dependedFlow;
	
	/**
	 * 依赖审批环节审批状态
	 */
	private Integer dependedFlowAuditStatus;
	
	/**
	 * 材料上交标记, 1=已上交, 0=未上交
	 */
	private Integer materialStatus = EProjectMaterialStatus.TODO.getValue();
	
	/**
	 * The enumeration of project audit status
	 * 
	 * @author Jeccy.Zhao
	 *
	 */
	public static enum EProjectAuditState
	{
		PASS(1, "pass"),						// 通过
		RETURNED(-1, "returned"),				// 退回
		REJECTED(0, "rejected"),				// 否决
		IGNORED(-2, "ignored");					// 忽略
		
		private Integer value;
		private String text;
		
		EProjectAuditState (Integer value, String text)
		{
			this.value = value;
			this.text = text;
		}
		
		public Integer getValue(){
			return value;
		}
		
		public String getText()
		{
			return this.text;
		}
	}
	
	/**
	 * The enumeration of project status
	 * 
	 * @author Jeccy.Zhao
	 *
	 */
	public static enum EProjectMaterialStatus
	{
		POSTED(1, "suspend"),				// 已上交
		TODO(0, "returned");				// 待上交
		
		private Integer value;
		private String text;
		
		EProjectMaterialStatus (Integer value, String text)
		{
			this.value = value;
			this.text = text;
		}
		
		public Integer getValue(){
			return value;
		}
		
		public String getText()
		{
			return this.text;
		}
	}
	
	/**
	 * The enumeration of project depended flow audit status
	 * 
	 * @author Jeccy.Zhao
	 *
	 */
	public static enum EProjectDependFlowAuditState
	{
		ONGOING(0, "ongoing"),					// 进行中
		PASS(1, "returned"),					// 通过
		REJECTED(-1, "rejected");				// 否决
		
		private Integer value;
		private String text;
		
		EProjectDependFlowAuditState (Integer value, String text)
		{
			this.value = value;
			this.text = text;
		}
		
		public Integer getValue(){
			return value;
		}
		
		public String getText()
		{
			return this.text;
		}
	}
	
	public void setProject(ModelProject project)
	{
		this.project = project;
	}

	public ModelProject getProject()
	{
		return project;
	}

	public void setMaterialStatus(Integer materialStatus)
	{
		this.materialStatus = materialStatus;
	}

	public Integer getMaterialStatus()
	{
		return materialStatus;
	}

	public void setDependedFlow(ModelFlowConfer dependedFlow)
	{
		this.dependedFlow = dependedFlow;
	}

	public ModelFlowConfer getDependedFlow()
	{
		return dependedFlow;
	}

	public void setDependedFlowAuditStatus(Integer dependedFlowAuditStatus)
	{
		this.dependedFlowAuditStatus = dependedFlowAuditStatus;
	}

	public Integer getDependedFlowAuditStatus()
	{
		return dependedFlowAuditStatus;
	}
	
}
